package com.qq.weixin.mp.message.hxexp.model.send;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.hxexp.weixin.common.jaxb.CDATAAdapter;

/**
 * 回复图片消息
 * @author li.jiang
 *
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public final class ImageReplyJaxb extends BaseReplyJaxb {

    private static final long serialVersionUID = 8095802630127237448L;
    @XmlElement(name = "Image")
    private Image image;
    /**
     * @return the image
     */
    public Image getImage() {
        return image;
    }

    /**
     * @param image the image to set
     */
    public void setImage(Image image) {
        this.image = image;
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Image {
        @XmlElement(name = "MediaId")
        @XmlJavaTypeAdapter(value = CDATAAdapter.class)
        private String mediaId;

        /**
         * @return the mediaId
         */
        public String getMediaId() {
            return mediaId;
        }

        /**
         * @param mediaId the mediaId to set
         */
        public void setMediaId(String mediaId) {
            this.mediaId = mediaId;
        }

        /* (non-Javadoc)
         * @see java.lang.Object#toString()
         */
        @Override
        public String toString() {
            return "Image [mediaId=" + mediaId + "]";
        }
    }

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "ImageReplyJaxb [image=" + image + ", getToUserName()=" + getToUserName() + ", getFromUserName()="
                + getFromUserName() + ", getCreateTime()=" + getCreateTime() + ", getMsgType()=" + getMsgType() + "]";
    }

}
